<template>
  <div id="app">
    <div class="top">
      <router-link
        :to="{
          name: 'Home',
        }"
        ><i class="fa fa-adjust" aria-hidden="true"></i
      ></router-link>
      <span>金铲铲社区</span>
      <router-link
        :to="{
          name: 'NewPost',
        }"
        ><i class="fa fa-arrow-circle-up" aria-hidden="true"></i
      ></router-link>
    </div>
    <router-view class="view" />
    <div id="nav">
      <ul>
        <li>
          <router-link
            :to="{
              name: 'Home',
            }"
            >首页</router-link
          >
        </li>
        <li>
          <router-link
            :to="{
              name: 'User',
            }"
            >个人中心</router-link
          >
        </li>
      </ul>
    </div>
  </div>
</template>

<style>
* {
  margin: 0;
  padding: 0;
}
a {
  color: black;
}
li {
  list-style: none;
}
#app {
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}
</style>
<style scoped>
.top {
  height: 40px;
  background: skyblue;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 1.5rem;
  color: azure;
}
#nav {
  height: 50px;
  width: 100%;
  padding: 5px 0;
  border-top: 1px solid black;
}
ul {
  display: flex;
  justify-content: space-around;
  list-style: none;
  height: 100%;
  line-height: 50px;
}
#nav a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
.view {
  flex: 1;
  width: 95%;
  margin: 0 auto;
  overflow: auto;
}
i {
  color: aliceblue;
}
</style>

